package com.zlf.mapper;

import com.zlf.entity.UserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhanglongfei
 * @since 2021-05-24
 */
@Mapper
public interface UserMapper extends BaseMapper<UserEntity> {

    /*
    根据用户名查找用户
     */
    @Select("SELECT u.id, u.username, u.password, u.salt, u.age, u.email, u.address FROM t_user u WHERE u.username = #{username}")
    UserEntity findUserByUsername(String username);

}
